package com.atguigu.atcrowdfunding.manager.service;

import com.atguigu.atcrowdfunding.bean.Member;
import com.atguigu.atcrowdfunding.bean.Permission;
import com.atguigu.atcrowdfunding.bean.Role;
import com.atguigu.atcrowdfunding.bean.User;
import com.atguigu.atcrowdfunding.util.Page;

import java.util.List;
import java.util.Map;

/**
 * @author xzt
 * @create 2021-02-08 19:34
 */
public interface UserService {

    public User login(Map paramMap);

    public boolean isRegister(String loginacct);

    public int register(Member member);

    Page queryPage(Map<String,Object> paramMap);

    int saveUser(User user);

    User getUserById(Integer id);

    User getUserByLoginacct(String loginacct);

    int updateUser(User user);

    int deleteUser(String loginacct);

    int deleteUsers(int[] ids);

    List<Role> queryAllRole();

    List<Integer> queryRoleByUserId(Integer id);

    Integer addRoleById(Integer userid, Integer[] roleid);

    Integer removeRoleById(Integer userid, Integer[] roleid);

    List<Permission> queryPermissionByUserId(Integer id);
}
